package com.cheng.service;

import com.cheng.dao.UserMapper;
import com.cheng.pojo.User;

public class UserServiceImpl implements UserService {

    private UserMapper userMapper;
    public void setUserMapper(UserMapper userMapper) {
        this.userMapper=userMapper;
    }

    public User selectUser(String userCode, String userPassword) {
        return userMapper.selectUser(userCode,userPassword);
    }

    @Override
    public User select_information(String userCode) {
        return userMapper.select_information(userCode);
    }

    @Override
    public int update_information(String userName, String userPassword, String phone, String address,String userCode) {
        return userMapper.update_information(userName,userPassword,phone,address,userCode);
    }

    @Override
    public int addMoney(String usercode, String money) {
        return userMapper.addMoney(usercode,money);
    }

    @Override
    public int refund(String userCode, String total_price) {
        return userMapper.refund(userCode,total_price);
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }


}
